package com.itheima.constructor;

/**
 * @Author 王加鑫
 * @Date 2021/4/26 16:49
 * @Version 1.0
 */
public class Student {
    private String name;
    private int age;

    public Student() {
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void show(){
        System.out.println(name + "..." + age);
    }
}

class StudentDemo{
    public static void main(String[] args) {
        Student s1 = new Student("张三",20);
        Student s2 = new Student("李四",30);
        s1.show();
        s2.show();
    }
}
